home *** CD-ROM | disk | FTP | other *** search
/ MIDICraft's MIDINET CD-ROM / MIDICraft's MIDINET CD-ROM.iso / DOSUTILS / MIDITRK.DOC < prev    next >
Text File  |  1997-03-29  |  9KB  |  278 lines

  1.         ******************************
  2.             MIDITRK v1.5
  3.     
  4.             midi track information
  5.               by Guenter Nagler 
  6.                 1995 
  7.           (gnagler@ihm.tu-graz.ac.at)
  8.         ******************************
  9.  
  10. [1] BACKGROUND
  11. I programmed this application to have a c++ module that can be used
  12. in some of my other midi applications for simply adding an option -track
  13. that displays a short track description table. This program was therefore
  14. needed to test this module as a standalone program.
  15. Now I use this program to get an overview about the tracks.
  16.  
  17. [2] FILES DESCRIPTION
  18.  
  19. MIDITRK.EXE.........dos utility program
  20. MIDITRK.DOC.........this file, showing usage of MIDITRK.EXE
  21. MIDIIO.HPP..........header file for a c++ midi parser
  22. MIDIIO.CPP..........source code for a c++ midi parser
  23. MTRACK.HPP..........header file for collecting midi track information
  24. MTRACK.CPP..........source code for collecting midi track information
  25. MIDITRK.CPP.........c++ source code for midi to text
  26. PROGNAME.CPP........tables for GM, GS, XG program names
  27. PROGNAME.H..........header for access to program tables
  28. MIDITRK.MAK.........make file for project 
  29. MIDITRK.CFG.........compiler options for make
  30. MIDITRK.PRJ.........project for borland c++ compilers
  31. only MIDITRK.EXE is required to run program
  32.  
  33. [3] COPYRIGHT
  34.  
  35. MIDITRK (c) 1995 was created by Guenter Nagler.
  36.  
  37. MIDITRK is free and may be used as you wish with this one exception:
  38.  
  39.     You may NOT charge any fee or derive any profit for distribution
  40.     of MIDITRK.  Thus, you may NOT sell or bundle MIDITRK with any 
  41.     product in a retail environment (shareware disk distribution, CD-ROM,
  42.     etc.) without permission of the author.
  43.  
  44. You may give MIDITRK to your friends, upload it to a BBS, or ftp it to
  45. another internet site, as long as you don't charge anything for it.
  46.  
  47. [4] DISCLAIMER
  48.  
  49. MIDITRK was designed to handle 100% compatible standard midi files.
  50. So I give no guarantees of the results, especially with non 100% 
  51. compatible midi files.
  52. If you find a midi file that you think to be 100% compatible midi
  53. that is not correctly handled, please send a sample file to 
  54. gnagler@ihm.tu-graz.ac.at . 
  55.  
  56. Use MIDITRK at your own risk.  Anything you do with MIDITRK is your
  57. responsibility, and not the author's.  Any damage caused to any person,
  58. computer, software, hardware, company, or business by running MIDITRK 
  59. is your responsibility, and the author will not be liable.
  60.  
  61. If you don't understand these terms, or are not sure of something, or
  62. are afraid something bad might come of using MIDITRK, don't  use  it!
  63. You are here forewarned.
  64.  
  65. [5] INSTALLATION 
  66.  
  67. [MSDOS]
  68.  
  69.   Simply copy MIDITRK.EXE in a directory that is in your path.
  70.   When you start the program without arguments
  71.  
  72.   C:\> MIDITRK
  73.  
  74.   you should get the usage text (see next section)
  75.  
  76. [UNIX]
  77. compile sources with your C++ compiler (e.g. GNU Compiler g++):
  78.  
  79. g++ -o miditrk miditrk.cpp midiio.cpp mtrack.cpp progname.cpp
  80.  
  81. and run program
  82.  
  83. $ miditrk
  84.  
  85. [6] USAGE
  86.  
  87. usage: MIDITRK [-verbose] file.mid [> file.txt]
  88.  
  89. The parts in brackets [...] are optional.
  90.  
  91. The text output is normally written to screen but can be relinked
  92. to a file  (> filename.txt)  or a printer (> prn). See your MS-DOS/UNIX
  93. manual for usage of  > and >> operators.
  94.  
  95. The program MIDITRK allows some options:
  96. -verbose  shows detailed information of tracks
  97.       
  98. [7] A sample of resulting text output
  99.  
  100. command> miditrk sample.mid
  101. File sample.mid:
  102. Track 1 [NOCHANNEL]: Sample Midi 
  103. Track 2 [1]:  (AnalogPad)
  104. Track 3 [2]:  (SynthBass2)
  105. Track 4 [3]:  (CleanGtr)
  106. Track 5 [4]:  (SynCalinope)
  107. Track 6 [5]:  (GhostPad)
  108. Track 7 [6]:  (Piano)
  109. Track 8 [7]:  (AirChorus)
  110. Track 9 [8]:  (Rezzo4ths)
  111. Track 10 [9]:  (BX-3Organ)
  112. Track 11 [10]:  (Drums)
  113. Track 12 [11]:  (OverDrive)
  114. Track 13 [12]:  (OverDrive)
  115.  
  116. shows the tracks contained in the midi file sample.mid in following form:
  117. Track tracknumber [trackchannel]: tracktitle (trackprogram)
  118.  
  119. tracknumber is a number between 1 and the number of tracks.
  120.  
  121. The trackchannel is between 1 and 16 (where channel 10 are drums in general 
  122. midi files). The channel is NOCHANNEL when the track does not contain 
  123. any notes. It is MULTICHANNEL when the track contains more than one 
  124. channels (usually found in format 0 midi files).
  125.  
  126. The tracktitle is optional and may contain any text (including those without 
  127. any sense). 
  128.  
  129. The trackprogram name is missed if the track does not set a program 
  130. (instrument). It is the name of the first chosen general midi program 
  131. in this track. It is (Drums) for all tracks at channel 10.
  132.  
  133. command> miditrk -verbose sample.mid
  134. File sample.mid:
  135. Tempo: 60.00 beats/min
  136. Tact: 4/4
  137. Resolution: 1/384
  138. Track 1:
  139.   channel: NOCHANNEL
  140.   name: Sample Midi
  141. Track 2:
  142.   channel: 1
  143.   program: AnalogPad
  144.   volume: 110  (0=mute,127=full)
  145.   balance: 64 (0=left, 64=mid, 127=right)
  146.   chorus: 90 (0-127)
  147.   reverb: 80 (0-127)
  148. Track 3:
  149.   channel: 2
  150.   program: SynthBass2
  151.   volume: 110  (0=mute,127=full)
  152.   balance: 64 (0=left, 64=mid, 127=right)
  153.   chorus: 70 (0-127)
  154.   reverb: 0 (0-127)
  155. Track 4:
  156.   channel: 3
  157.   program: CleanGtr
  158.   volume: 110  (0=mute,127=full)
  159.   balance: 64 (0=left, 64=mid, 127=right)
  160.   chorus: 80 (0-127)
  161.   reverb: 127 (0-127)
  162. Track 5:
  163.   channel: 4
  164.   program: SynCalinope
  165.   volume: 110  (0=mute,127=full)
  166.   balance: 64 (0=left, 64=mid, 127=right)
  167.   chorus: 30 (0-127)
  168.   reverb: 127 (0-127)
  169. Track 6:
  170.   channel: 5
  171.   program: GhostPad
  172.   volume: 110  (0=mute,127=full)
  173.   balance: 24 (0=left, 64=mid, 127=right)
  174.   chorus: 30 (0-127)
  175.   reverb: 127 (0-127)
  176. Track 7:
  177.   channel: 6
  178.   program: Piano
  179.   volume: 110  (0=mute,127=full)
  180.   balance: 44 (0=left, 64=mid, 127=right)
  181.   chorus: 90 (0-127)
  182.   reverb: 127 (0-127)
  183. Track 8:
  184.   channel: 7
  185.   program: AirChorus
  186.   volume: 110  (0=mute,127=full)
  187.   balance: 104 (0=left, 64=mid, 127=right)
  188.   chorus: 50 (0-127)
  189.   reverb: 127 (0-127)
  190. Track 9:
  191.   channel: 8
  192.   program: Rezzo4ths
  193.   volume: 110  (0=mute,127=full)
  194.   balance: 64 (0=left, 64=mid, 127=right)
  195.   chorus: 20 (0-127)
  196.   reverb: 90 (0-127)
  197. Track 10:
  198.   channel: 9
  199.   program: BX-3Organ
  200.   volume: 110  (0=mute,127=full)
  201.   balance: 64 (0=left, 64=mid, 127=right)
  202.   chorus: 20 (0-127)
  203.   reverb: 127 (0-127)
  204. Track 11:
  205.   channel: 10
  206.   program: Drums
  207.   volume: 110  (0=mute,127=full)
  208.   balance: 64 (0=left, 64=mid, 127=right)
  209.   chorus: 5 (0-127)
  210.   reverb: 90 (0-127)
  211. Track 12:
  212.   channel: 11
  213.   program: OverDrive
  214.   volume: 110  (0=mute,127=full)
  215.   balance: 64 (0=left, 64=mid, 127=right)
  216.   chorus: 127 (0-127)
  217.   reverb: 127 (0-127)
  218. Track 13:
  219.   channel: 12
  220.   program: OverDrive
  221.   volume: 110  (0=mute,127=full)
  222.   balance: 127 (0=left, 64=mid, 127=right)
  223.   chorus: 40 (0-127)
  224.   reverb: 127 (0-127)
  225.  
  226. The tempo information is shown in beats (=quarternotes) per minute.
  227. Tempo 40 beats/min is very slow and 240 beats/min is very speedy.
  228. Tempo could change during playing the midi, only the first tempo setting
  229. is shown (default is 120 beats/min).
  230.  
  231. The tact information is shown as nominator / denominator. Usually tacts are
  232. 4/4, 3/4 (waltz), 6/8. Tact can change during playing a midi song. Only the
  233. first tact setting is shown (default is 4/4).
  234.  
  235. The resolution information shows the smallest usable note/pause duration
  236. in this song. 1/384 and 1/768 are typical resolutions. Normally this value
  237. is of form  1/(3 * (2^^n)) as 1/384 = 1/(3 * (2^^7)), so that trioles of
  238. a 128th note could be used.
  239.  
  240. Volume information is a value in range of 0 and 127 where 0 is silent (mute)
  241. and 127 is very loud.
  242.  
  243. Balance information is a value in range of 0 and 127. At value 0 the notes 
  244. can only be heared at left output channel (box). At value 1 the notes can 
  245. only be heared at right output channel. At value 64 the notes can be heared
  246. at both channel at same volume.
  247.  
  248. Chorus and reverb effect values are in range of 0 and 127.
  249.  
  250. [8] SUGGESTIONS / COMMENTS / BUG REPORTS / QUESTIONS
  251.  
  252.          WWW:    http://hgiicm.tu-graz.ac.at/Cpub
  253.           contains all my dos/unix midi programs
  254.          EMAIL:  gnagler@ihm.tu-graz.ac.at
  255.  
  256. [9] CHANGES
  257. v1.0 to v1.1:
  258.   * added midi format information in verbose output
  259. v1.1 to v1.2
  260.   * shows midi channels of multi channel track 
  261. v1.2 to v1.3
  262.   * shows default program setting of channels/tracks that don't set programs
  263.   * bug fixed: show channels/tracks that use nothing but note commands
  264.   * bug fixed: index -1 used when accessing channel_used array
  265.     (could cause segmentation fault)
  266.   * track names are now written between "..." to distinguish from rest
  267.     (sometimes tracknames contain parentheses)
  268.   * bug fixed: ignored channels in multichannel tracks that didn't play
  269.     notes
  270.   * calculation of tempo in beats/beat without using floating point 
  271.     arithmetics
  272. v1.3 to v1.4
  273.   * using larger buffer to find track channel
  274. v1.4 to v1.5
  275.   * support different midi modes (GM, GS, XG) to get exactlier program names
  276.     midi file nees to contain mode reset sysex that GS and XG instruments
  277.     are shown (default: GM mode is assumed).
  278.